A memory slot for per instance data in a Shader. More...
Public Types | |
| enum | DATA_TYPE { DATA_TYPE::UNKNOWN = 0, DATA_TYPE::WORLD_MATRIX, DATA_TYPE::CUSTOM } |
Public Member Functions | |
| ShaderInstanceMemorySlot () | |
| virtual | ~ShaderInstanceMemorySlot () |
| DATA_TYPE | getType () const |
| virtual unsigned int | getDataSize () const |
| virtual const char * | getTypeAsString () const override |
| void | setAsWorldMatrix () |
| void | setAsCustom (ShaderInstanceCustomSlot *slot) |
| virtual void | exportClassToTree (nkExport::Node *rootNode) override |
| virtual void | importClassFromTree (nkExport::Node *rootNode) override |
Public Member Functions inherited from nkGraphics::ShaderMemorySlot | |
| ShaderMemorySlot () | |
| virtual | ~ShaderMemorySlot () |
| const char * | getSlotType () const |
| virtual const char * | getDataTypeAsString () const =0 |
Public Member Functions inherited from nkExport::Exportable | |
| Exportable () | |
| virtual | ~Exportable () |
A memory slot for per instance data in a Shader.
These slots are fed within a Shader, and offer the capabilities of feeding per instance data to a Program.
|
strong |
| nkGraphics::ShaderInstanceMemorySlot::ShaderInstanceMemorySlot | ( | ) |
Constructor. See Shader::addInstanceMemorySlot().
|
virtual |
Destructor.
| DATA_TYPE nkGraphics::ShaderInstanceMemorySlot::getType | ( | ) | const |
|
virtual |
|
overridevirtual |
| void nkGraphics::ShaderInstanceMemorySlot::setAsWorldMatrix | ( | ) |
Prepare the slot to feed world matrices.
| void nkGraphics::ShaderInstanceMemorySlot::setAsCustom | ( | ShaderInstanceCustomSlot * | slot | ) |
Prepares the slot to use a custom slot to feed the data.
| slot | The custom slot that should feed the data. |
|
overridevirtual |
Basic exporting capabilities.
| rootNode | The tree to export to. |
Reimplemented from nkGraphics::ShaderMemorySlot.
|
overridevirtual |
Basic importing capabilities.
| rootNode | The tree to import from. |
Implements nkExport::Exportable.